import io.grpc.stub.StreamObserver;

public class HelloService extends com.example.grpc.HelloServiceGrpc.HelloServiceImplBase {

    @Override
    public void hello(com.example.grpc.HelloRequest request, StreamObserver<com.example.grpc.HelloResponse> responseObserver) {
        System.out.println(request);

        String greeting = "Hi " + request.getName()
                + " you are " + request.getAge() + " years old"
                + " your hobby is " + (request.getHobbiesList())
                + " your tags " + request.getTagsMap();

        com.example.grpc.HelloResponse response = com.example.grpc.HelloResponse.newBuilder().setGreeting(greeting).build();
        responseObserver.onNext(response);
        responseObserver.onCompleted();
    }
}